/*
 * $Id: FastBoxStyle.java 108 2009-05-06 07:54:38Z meyer@alphatec.de $
 * 
 *
 * Copyright 2009 DeltaDesk
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package deltadesk.gui.deltagui.widget.box;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;

/**
 * FastBoxStyle.
 * 
 * A box style should be rendered very fast (even on slow systems).
 * 
 * @author Andreas Meyer
 * @version $Revision: 108 $
 */
public class FastBoxStyle implements BoxStyle {

	/**
	 * @see deltadesk.gui.deltagui.graphics.Renderable#render(java.awt.Graphics2D)
	 */
	public void render(final Graphics2D g2) {

		final Rectangle rect = g2.getClipBounds();
		
		g2.setColor(Color.GRAY);
		g2.fillRect(rect.x, rect.y, rect.width, rect.height);
	}

}
